import {userInfo,communal,myWallet} from '@/api/model.js';

// 获取七牛云信息
export const getCommunal = async ({ commit }) => {
	const response = await communal();
	if(response.status == "200"){
		commit("SET_COMMUNAL_INFO", response.data);
        sessionStorage.setItem("imgUrl",response.data.BucketDomain); 
	}
};

//获取个人信息
export const getUserInfo = async ({ commit }) => {
	const response = await userInfo();
	if(response.status == "200"){
		commit("SET_USER_INFO", response.data)
	}
};

//获取个人账户余额
export const getMyWallet = async ({ commit }) => {
	const response = await myWallet();
	if(response.status == "200"){
		commit("SET_MY_WALLET", response.data)
	}
};

